package one.stand.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import one.stand.model.ResultModel;
import one.stand.request.AdminRequest;
import one.stand.response.AdminResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: ZRH
 * @CreateDate: 2019/4/17 9:45
 */
@RestController
@RequestMapping("adminApi/home")
@Api(description = "登录")
public class HomeController extends BaseController{

    @ApiOperation(value = "总后台登录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "loginName", value = "登录名称", required = true, paramType = "String"),
            @ApiImplicitParam(name = "passWord", value = "登录密码", required = true, paramType = "String"),
    })
    @PostMapping("login")
    public ResultModel<AdminResponse> login(AdminRequest request) {
        return adminFegin.login(request);
    }
}
